<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var source = new EventSource("/sse/get");
        source.onmessage = function (evt) {
            console.log(evt.data);
            document.getElementById('text').innerText = evt.data;
        }
    </script>
</head>
<body>
用户一
<p id="text"></p>

</body>
</html>